from django.db import models


class DouYuDataModel(models.Model):
    room_name = models.CharField(max_length=120, verbose_name="房间名")
    category = models.CharField(max_length=120, verbose_name='类别')
    auth = models.CharField(max_length=120, verbose_name='作者')
    hot_num = models.CharField(max_length=120, verbose_name='热度')
    # models.URLField
    update_time = models.DateTimeField(auto_now=True, verbose_name='修改时间')
    create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间')

    def __str__(self):
        return "<房间名:{}>".format(self.room_name)
